package com.appwoo.txtws.activity;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ListView;
import android.widget.TextView;
import com.appwoo.android.activity.BaseActivity;
import com.appwoo.android.exception.NotFoundNetWorkException;
import com.appwoo.android.exception.TimeOutException;
import com.appwoo.txtws.adapter.ImprotentInfoAdapter;
import com.appwoo.txtws.bean.ImprotentInfoBean;
import com.appwoo.txtws.bean.ServerAppBean;
import com.appwoo.txtws.component.Logger;
import com.appwoo.txtws.service.ShowImprotentInfoService;
import java.io.IOException;
import java.util.List;
import org.xmlpull.v1.XmlPullParserException;

public class ImprotentInfoActivity extends BaseActivity
{
  private String alertString = "";
  private Bundle bundle = null;
  private String equipName;
  private List<ImprotentInfoBean> f_urlList;
  private ImprotentInfoAdapter impInfoAdapter;
  private String logtype;
  private ServerAppBean serverAppBean = null;
  private ShowImprotentInfoService showimpInfoService = null;
  private ListView v_listview_imp_list;
  private TextView v_teTextView_imp_logtype;
  private TextView v_textview_imp_back;

  private void addListener()
  {
    backListener();
  }

  private void backListener()
  {
    this.v_textview_imp_back.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        ImprotentInfoActivity.this.backAcitvity(ImprotentInfoActivity.this);
      }
    });
  }

  private void bgShowList()
  {
    try
    {
      if (this.logtype.equals("badurl"))
      {
        this.logtype = "0";
        this.v_teTextView_imp_logtype.setText(getString(2131427596));
      }
      while (true)
      {
        Logger.i("TXTW", "logtype==" + this.logtype);
        this.f_urlList = this.showimpInfoService.getQTopWrite(this.serverAppBean.getUserId(), this.logtype, this.equipName, this);
        if (this.f_urlList != null)
          this.v_listview_imp_list.setAdapter(getAdapter(this.f_urlList));
        return;
        if (!this.logtype.equals("limturl"))
          break;
        this.logtype = "1";
        this.v_teTextView_imp_logtype.setText(getString(2131427596));
      }
    }
    catch (IOException localIOException)
    {
      while (true)
      {
        this.alertString = getString(2131427524);
        continue;
        if (this.logtype.equals("limgame"))
        {
          this.logtype = "2";
          this.v_teTextView_imp_logtype.setText(getString(2131427529));
        }
      }
    }
    catch (XmlPullParserException localXmlPullParserException)
    {
      while (true)
        this.alertString = getString(2131427524);
    }
    catch (TimeOutException localTimeOutException)
    {
      while (true)
        this.alertString = getString(2131427526);
    }
    catch (NotFoundNetWorkException localNotFoundNetWorkException)
    {
      while (true)
      {
        localNotFoundNetWorkException.getClass();
        this.alertString = "没有连接到网络";
      }
    }
  }

  private ImprotentInfoAdapter getAdapter(List<ImprotentInfoBean> paramList)
  {
    try
    {
      this.impInfoAdapter = new ImprotentInfoAdapter(this, paramList);
      this.impInfoAdapter.notifyDataSetChanged();
      label20: return this.impInfoAdapter;
    }
    catch (Exception localException)
    {
      break label20;
    }
  }

  private void initView()
  {
    this.v_textview_imp_back = ((TextView)findViewById(2131493131));
    this.v_teTextView_imp_logtype = ((TextView)findViewById(2131493133));
    this.showimpInfoService = new ShowImprotentInfoService();
    this.serverAppBean = ((ServerAppBean)getApplication());
    this.v_listview_imp_list = ((ListView)findViewById(2131493135));
    this.equipName = getSharedPreferences("equipname", 0).getString("equipname", null);
    this.bundle = getIntent().getExtras();
    if (!this.bundle.isEmpty())
      this.logtype = this.bundle.getString("logtype");
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903114);
    initView();
    addListener();
    bgShowList();
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.activity.ImprotentInfoActivity
 * JD-Core Version:    0.6.2
 */